package com.dzh.service.impl;

import com.dzh.dao.PaymentDao;
import com.dzh.entities.Payment;
import com.dzh.service.PaymentService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author DZH
 * @createTime 2021/7/18 19:51
 */
@Service
public class PaymentServiceImpl implements PaymentService {
//    @Resource  也可以用  java自带的注解类
    @Autowired
    private PaymentDao paymentDao;


    @Override
    public int insert(Payment payment) {
        return paymentDao.insert(payment);
    }

    @Override
    public Payment getPaymentById(Long id) {
        return paymentDao.getPaymentById(id);
    }
}
